{include file="header.html"}
<script type="text/javascript" charset="utf-8" src="../htmleditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="../htmleditor/ueditor.all.min.js"> </script>
<!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
<!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
<script type="text/javascript" charset="utf-8" src="../htmleditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript">
$(function(){
    $('#attribute_form').validate({
        errorPlacement: function(error, element){
            $(element).next('.field_notice').hide();
            $(element).after(error);
        },
        success       : function(label){
            label.addClass('right').text('OK!');
        },
        rules : {    
        	attr_name : {
                required : true
            },
            sort_order:{
               number   : true
            },/*
            def_value : {
                required : true
            },*/
        },
        messages : {
        	attr_name : {
                required : '{$lang.name_empty}'
            },
            sort_order  : {
                number   : '{$lang.number_only}'
            },/*
            def_value : {
                required : '{$lang.def_value_empty}'
            },*/
        }
    });
});
</script>
<div id="rightTop">
    <p>{$lang.attribute}</p>
    <ul class="subnav">
        <li><a class="btn1" href="index.php?app=attribute">{$lang.manage}</a></li>
        {if $attribute.attr_id}
        <li><a class="btn1" href="index.php?app=attribute&amp;act=add">{$lang.add}</a></li>
        {else}
        <li><span>{$lang.add}</span></li>
        {/if}
    </ul>
</div>

<div class="info">
    <form method="post" enctype="multipart/form-data" id="attribute_form">
        <table class="infoTable">
            <tr>
                <th class="paddingT15">{$lang.attr_name}:</th>
                <td class="paddingT15 wordSpacing5">
                    <input class="infoTableInput" id="attr_name" type="text" name="attr_name" value="{$attribute.attr_name|escape}" />
                </td>
            </tr>      
            <tr>
                <th class="paddingT15">{$lang.sort_order}:</th>
                <td class="paddingT15 wordSpacing5">
                    <input class="sort_order" id="sort_order" type="text" name="sort_order" value="{$attribute.sort_order|escape}" />
                </td>
            </tr>  
            <tr>
                <th class="paddingT15">{$lang.attributeset}:</th>
                <td class="paddingT15 wordSpacing5">
                    <select name="input_mode" id="input_mode">
                    	<option value="select">{$lang.select}</option>
                    	<option value="text">{$lang.text}</option>
                    </select>
                </td>
            </tr>                                         
            <tr>
	             <th class="paddingT15">{$lang.def_value}:</th>
	             <td class="paddingT15 wordSpacing5">                     
                  <textarea id="def_value" name="def_value" style="width:350px;height:100px;">{$attribute.def_value|escape}</textarea>
           		 </td>
            </tr>             
	        <tr>
	            <th></th>
	            <td class="ptb20">
	                <input class="formbtn" type="submit" name="Submit" value="{$lang.submit}" />
	                <input class="formbtn" type="reset" name="Submit2" value="{$lang.reset}" />
	            </td>
	        </tr>
        </table>
    </form>
</div>
{include file="footer.html"}
